#
#	Makefile to compile in GNU environment
#	Tested with ATI Stream SDK Beta 2 (CPU only)
#	by nicknickolaev@gmail.com
#

SOURCES= src/cl_main.cpp src/clTestBase.cpp
EXEC= AOBenchCL
CL= ao.cl
TARGET_DIR= build/

#DBG_FLAGS= -g -O0

include ../common/platform.mk

INC_FLAGS += -I include/

all:cpu gpu
	g++ src/info.cpp -o $(TARGET_DIR)info $(DBG_FLAGS) $(INC_FLAGS) $(LIB_FLAGS)
	cp -f ../common/$(CL) $(TARGET_DIR)$(CL)

cpu:
	g++ $(SOURCES) -o $(TARGET_DIR)$(EXEC)_cpu $(DBG_FLAGS) $(INC_FLAGS) $(LIB_FLAGS) -DUSE_CPU

gpu:
	g++ $(SOURCES) -o $(TARGET_DIR)$(EXEC)_gpu $(DBG_FLAGS) $(INC_FLAGS) $(LIB_FLAGS) -DUSE_GPU

clean:
	rm -f $(TARGET_DIR)*.o $(TARGET_DIR)$(EXEC)_cpu $(TARGET_DIR)$(EXEC)_gpu $(TARGET_DIR)info $(TARGET_DIR)$(CL)
